/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MemberOperation;
import java.util.List;

import CRUD.MemberannounceHome;
import java.util.Date;
import java.util.Iterator;
import java.util.Vector;
import xmlMapping.Memberannounce;
/**
 *
 * @author root
 */
public class MemberAnnouncement {
    public Vector<Memberannounce> getAnnouncement()
    {
        MemberannounceHome hom=new MemberannounceHome();
        Memberannounce ann=new Memberannounce();
       
     List  list =hom.Get();
     
     Iterator it=list.iterator();
     Vector<Memberannounce> vector=new Vector<Memberannounce>();
     Memberannounce announce;
       while (it.hasNext()) {
            announce = (Memberannounce) it.next();
            if (announce.getExpiredate().after(new Date())) {
               vector.add(announce);
                System.out.println(" announcement is "+ann.getMsgBody());
            }
        }
     
     
     
     
     
      return vector;
        
    }
    
}
